package com.qd.thirdpart.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * 交投停车场同步
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("third_jt_park_sync")
public class ThirdJtParkSync extends Model<ThirdJtParkSync> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "park_no", type = IdType.ASSIGN_ID)
    private String parkNo;
    /**
     * 停车场名称
     */
    @TableField("name")
    private String name;
    /**
     * 停车场地址
     */
    @TableField("address")
    private String address;
    /**
     * 经度
     */
    @TableField("lng")
    private BigDecimal lng;
    /**
     * 纬度
     */
    @TableField("lat")
    private BigDecimal lat;
    /**
     * 总车位
     */
    @TableField("total")
    private Integer total;
    /**
     * 空闲状态
     */
    @TableField("free_status")
    private String freeStatus;
    /**
     * 开放时间
     */
    @TableField("service_start")
    private LocalTime serviceStart;
    /**
     * 关闭时间
     */
    @TableField("service_end")
    private LocalTime serviceEnd;
    /**
     * 计费规则ID
     */
    @TableField("fee_rule_id")
    private Integer feeRuleId;
    /**
     * 转换后的经度
     */
    @TableField("convert_lng")
    private BigDecimal convertLng;
    /**
     * 转换后的纬度
     */
    @TableField("convert_lat")
    private BigDecimal convertLat;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 添加时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    public void freeData() {
        this.parkNo = null;
        this.name = null;
        this.address = null;
        this.lng = null;
        this.lat = null;
        this.total = null;
        this.freeStatus = null;
        this.serviceStart = null;
        this.serviceEnd = null;
        this.feeRuleId = null;
        this.convertLng = null;
        this.addTime = null;
        this.updateTime = null;
    }

}
